import classNames from "classnames";
import React from "react";
export function AvatarStyle(WrappedComponent) {
    // 泛型限定
    return class extends WrappedComponent {
        render() {
            const { sz, className } = this.props;
            const parent = super.render();
            const klass = classNames("sr-ant-avatar", className, {
                [`sr-ant-avatar-${sz}`]: sz,
            });
            let props = {
                ...this.props,
                className: klass,
            };
            return React.cloneElement(parent, { ...props });
        }
    };
}
